package com.zhang.edu.realtime.publish.service.impl;

import com.zhang.edu.realtime.publish.bean.TrafficVisitorStatsPerHour;
import com.zhang.edu.realtime.publish.bean.TrafficVisitorTypeStats;
import com.zhang.edu.realtime.publish.mapper.TrafficVisitorStatsMapper;
import com.zhang.edu.realtime.publish.service.TrafficVisitorStatsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service

public class TrafficVisitorStatsServiceImpl  implements TrafficVisitorStatsService {

    @Resource
    private TrafficVisitorStatsMapper trafficVisitorStatsMapper;

    // 获取分时流量统计数据
    @Override
    public List<TrafficVisitorStatsPerHour> getVisitorPerHrStats(Integer date) {
        return trafficVisitorStatsMapper.selectVisitorStatsPerHr(date);
    }

    @Override
    public List<TrafficVisitorTypeStats> getVisitorTypeStats(Integer date) {
        return trafficVisitorStatsMapper.selectVisitorTypeStats(date);
    }


}
